#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* dest, const char* src, size_t num)
{
	assert(dest != NULL);
	assert(src != NULL);
	char* ret = dest;
	while (*dest)
	{
		dest++;
    }
	for (int i = 0; i < num; i++)
	{
		*(dest + i) = *(src + i);
		if (*(src + i) == '\0')
			break;
	}
	return ret;
}


int main()
{
	char arr[20] = "12345";
	char brr[] = "222";
	my_strncat(arr, brr, 5);
	printf("%s", arr);
	return 0;
}